deserialize list of objects c#

60

deserialize list of objects c# -

string json = @"['Starcraft','Halo','Legend of Zelda']";

List<string> videogames = JsonConvert.DeserializeObject<List<string>>(json);

Console.WriteLine(string.Join(", ", videogames.ToArray()));
// Starcraft, Halo, Legend of Zelda

Comments

Submit
0 Comments